package com.jt.controller;

import com.jt.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class UserController02 {

    //1. 面向接口编程
    @Resource//依赖注入
    private UserService userService;

    @RequestMapping("getMsg")
    public String getMsg(){
        return userService.getMsg();
    }
}
